<extend name="Public/user"/>
<block name="user-right">
	<!--main_right-->
	<div class="main_r f_fr" style="position:relative;">
		<div class="user_kx">
			<h3 class="user_kx_title">
				已发货列表

			</h3>
		</div>
		<div style="position: absolute;top: 90px;right: 30px;width: 200px;height: 29px;">
			<form action="{:url('User/baoguolist','status='.$_GET['status'])}" method="get">
				<input type="text" name="keywords" value="<?php echo $_GET['keywords'] ?>" style="width: 100px;margin-top: 2px;padding: 2px;" placeholder=""><input type="submit" value="{:lang('search')}" style="border: none;background: red;color:#fff;height: 27px;padding: 0 20px;">
			</form>
		</div>
		<div class="user_kx">

			<!-- Nav tabs -->
			<ul class="nav nav-tabs" role="tablist">

				<li role="presentation" class="<eq name="status" value="">active<else /></eq>"><a href="{:url('User/baoguolist')}">{:lang('all')}</a></li>
				<li role="presentation" class="<eq name="status" value="3">active<else /></eq>"><a href="{:url('User/baoguolist','status=3')}">{:lang('pending_pay')}</a></li>
				<li role="presentation" class="<eq name="status" value="4">active<else /></eq>"><a href="{:url('User/baoguolist','status=4')}">{:lang('pending_shipped')}</a></li>
				<li role="presentation" class="<eq name="status" value="5">active<else /></eq>"><a href="{:url('User/baoguolist','status=5')}">{:lang('pending_receipt')}</a></li>
				<li role="presentation" class="<eq name="status" value="6">active<else /></eq>"><a href="{:url('User/baoguolist','status=6')}">{:lang('has_receipt')}</a></li>
				<li role="presentation" class="<eq name="status" value="9">active<else /></eq>"><a href="{:url('User/baoguolist','status=9')}">{:lang('withholding')}</a></li>

			</ul>

			<!-- Tab panes -->
			<div class="tab-content">
				<div role="tabpanel" class="tab-pane active" id="home">
					<table class="table table-striped table-bordered">

						<tbody>
						<tr >
							<th class="w70 ta_c" >{:lang('waybill_num')}</th>
							<th class="w100 ta_c">{:lang('shipping_method')}</th>
							<th class="w70 ta_c" >转运国内</th>
							<th class="w70 ta_c">{:lang('belong_order')}</th>
							<th class="w100 ta_c">{:lang('index_volume')}</th>
							<th class="w90 ta_c">{:lang('weight')}kg</th>
							<th class="ta_c">{:lang('freight')}{:config('MAIN_COIN')}</th>
							<th class="ta_c">{:lang('remark')}</th>
							<th class="w80 ta_c">{:lang('status')}</th>

						</tr>
						<volist name="list.list" id="v">
							<tr>
								<td>{$v.bgsn}</td>
								<td>{$v.ydid|get_deliver_name_yundan_id}</td>
								<td>{$v.in_express}</td>
								<td><a href="{:url('User/dingdanview','id='.$v['ydid'])}">{$v.ydid|get_yundan_sn}</a></td>
								<td>{$v.voweight}</td>
								<td>{$v.weight}</td>
								<td>实重:{$v.freight}</td>
								<td>{$v.remark}</td>
								<td>
									{$v.status|getyundanstatus}
									<eq name="v.status" value="3">
										<br>
										<a href="{:url('User/paydingdan','id='.$v['ydid'])}"
										   style="display: inline-block; background: red; color: #fff; padding: 2px 2px;">{:lang('go_payment')}</a></eq>
									<eq name="v.status" value="5">
										<eq name="v.secpay" value="1">
											<br>
											<a href="javascript:shouhuo({$v.id});"
											   style="display: inline-block; background: red; color: #fff; padding: 2px 2px; margin-bottom: 2px;">{:lang('confirm_receipt')}</a></eq></eq>
								</td>
							</tr>
						</volist>
						</tbody>
					</table>
					<div class="page">{$_page}</div>
				</div>

		</div>
	</div>
</block>
<block name="javascript">
	<script type="text/javascript">
		function shouhuo(id){
			$.post("{:url('baoguoshouhuo')}",{'id':id},function(data){
				if (data.status) {
					$.thinkbox.success(data.info);
					setTimeout(jumpurl(data.url),1000);
				}else{
					$.thinkbox.error(data.info);
				};
			})
		}
	</script>
	</block>